﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace LibraryManagement
{
    [Serializable]
    public class DataTracking : DomainAggregate
    {
        #region Constants
        private const String PropDataTrackingGuid = @"DataTrackingGuid";
        private const String PropUserFirstName = @"UserFirstName";
        private const String PropUserLastName = @"UserLastName";
        private const String PropUpdateStartTime = @"UpdateStartTime";
        private const String PropUpdateFinishTime = @"UpdateFinishTime";
        private const String PropUpdatedProductId = @"UpdatedProductId";
        private const String PropCompanyId = @"CompanyId";
        private const String PropModule = @"Module";
        private const String PropButtonEvent = @"ButtonEvent";
        #endregion

        #region Constructors


        /// <summary>
        /// Initializes a new instance of the <see cref="DataTracking"/> class.
        /// </summary>
        public DataTracking()
            : base()
        {
            //add in our properties

            AddProperty(PropDataTrackingGuid, "DataTrackingGuid", typeof(Guid), String.Empty, false);
            AddProperty(PropUserFirstName, "UserFirstName", typeof(String), String.Empty, false);
            AddProperty(PropUserLastName, "UserLastName", typeof(String), String.Empty, false);
            AddProperty(PropUpdateStartTime, "UpdateStartTime", typeof(Nullable<DateTime>), null, false);
            AddProperty(PropUpdateFinishTime, "UpdateFinishTime", typeof(Nullable<DateTime>), null, false);
            AddProperty(PropUpdatedProductId, "UpdatedProductId", typeof(Nullable<Int32>),null , false);
            AddProperty(PropCompanyId, "CompanyId", typeof(Nullable<Int32>), null, false);
            AddProperty(PropModule, "Module", typeof(Nullable<Int32>), null, false);
            AddProperty(PropButtonEvent, "ButtonEvent", typeof(Nullable<Int32>), null, false);
        }
        #endregion

        #region Properties

        /// <summary>
        /// Gets or sets the data tracking GUID.
        /// </summary>
        /// <value>The data tracking GUID.</value>
        public Guid DataTrackingGuid
        {
            get { return (Guid)this[PropDataTrackingGuid]; }
            set { this[PropDataTrackingGuid] = value; }
        }
        /// <summary>
        /// Gets or sets the updated product id.
        /// </summary>
        /// <value>The updated product id.</value>
        public Nullable<Int32> UpdatedProductId
        {
            get { return (Nullable<Int32>)this[PropUpdatedProductId]; }
            set { this[PropUpdatedProductId] = value; }
        }
        /// <summary>
        /// Gets or sets the company id.
        /// </summary>
        /// <value>The company id.</value>
        public Nullable<Int32> CompanyId
        {
            get { return (Nullable<Int32>)this[PropCompanyId]; }
            set { this[PropCompanyId] = value; }
        }

        /// <summary>
        /// Gets or sets the first name of the user.
        /// </summary>
        /// <value>The first name of the user.</value>
        public String UserFirstName
        {
            get { return (String)this[PropUserFirstName]; }
            set { this[PropUserFirstName] = value; }
        }
        /// <summary>
        /// Gets or sets the last name of the user.
        /// </summary>
        /// <value>The last name of the user.</value>
        public String UserLastName
        {
            get { return (String)this[PropUserLastName]; }
            set { this[PropUserLastName] = value; }
        }

        /// <summary>
        /// Gets or sets the module.
        /// </summary>
        /// <value>The module.</value>
        public Nullable<Int32> Module
        {
            get { return (Nullable<Int32>)this[PropModule]; }
            set { this[PropModule] = value; }
        }

        /// <summary>
        /// Gets or sets the button event.
        /// </summary>
        /// <value>The button event.</value>
        public Nullable<Int32> ButtonEvent
        {
            get { return (Nullable<Int32>)this[PropButtonEvent]; }
            set { this[PropButtonEvent] = value; }
        }

        /// <summary>
        /// Gets or sets the update start time.
        /// </summary>
        /// <value>The update start time.</value>
        public Nullable<DateTime> UpdateStartTime
        {
            get { return (Nullable<DateTime>)this[PropUpdateStartTime]; }
            set { this[PropUpdateStartTime] = value; }
        }

        /// <summary>
        /// Gets or sets the update finish time.
        /// </summary>
        /// <value>The update finish time.</value>
        public Nullable<DateTime> UpdateFinishTime
        {
            get { return (Nullable<DateTime>)this[PropUpdateFinishTime]; }
            set { this[PropUpdateFinishTime] = value; }
        }
      
        #endregion
    }
}